]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: deal with recycling of closed active connections
authorOwen W. Taylor <otaylor@fishsoup.net>
Sat, 2 Apr 2011 19:30:45 +0000 (15:30 -0400)
committerDan Winship <danw@gnome.org>
Mon, 11 Apr 2011 14:38:00 +0000 (10:38 -0400)
If you restart NetworkManager, then the list of active connections
is emptied, then comes back with the same GObjects in it. If the
_primaryDevice field isn't cleared on the object, then we won't
know we need to set it back on the device, resulting in the active
device not showing up in the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=646558

js/ui/status/network.js

index 885c5d7936ebedd6777dc330a908605911a77467..5510272c1549b796c319524e6a9f3f095a6190f8 100644 (file)
@@ -1758,8 +1758,10 @@ NMApplet.prototype = {
 
         for (let i = 0; i < closedConnections.length; i++) {
             let active = closedConnections[i];
-            if (active._primaryDevice)
+            if (active._primaryDevice) {
                 active._primaryDevice.setActiveConnection(null);
+                active._primaryDevice = null;
+            }
             if (active._notifyStateId) {
                 active.disconnect(active._notifyStateId);
                 active._notifyStateId = 0;